Functional Manipulation of Bit Streams
نویسندگان
چکیده
Writing code that manipulates bit streams is a painful and errorprone programming task, currently often performed via bit twiddling techniques such as explicit bit shifts and bit masks in programmer-allocated buffers. Still, this kind of programming is necessary in many application areas ranging from decoding streaming media files to implementing network protocols. In this paper we show how high-level constructs from functional programming, such as binary pattern matching at the bit level and binary comprehensions, can make bit stream manipulation more succinct, less error-prone, and totally memory-safe. We formally define these language constructs, show a variety of example uses from several different application areas, and describe their implementation in detail. We hold that a binary data structure with the ability to perform pattern matching at the bit level allows (purely) functional languages to significantly expand the range of their practical uses.
منابع مشابه
Applications, Implementation and Performance Evaluation of Bit Stream Programming in Erlang
Writing code that manipulates bit streams is a painful and error-prone programming task, often performed via bit twiddling techniques such as explicit bit shifts and bit masks in programmer-allocated buffers. Still, this kind of programming is necessary in many application areas ranging from decoding streaming media files to implementing network protocols. In this paper we employ highlevel cons...
متن کاملA Full-Fuzzy Rate Controller for Variable Bit Rate Video
In this paper, we propose a new full-fuzzy video ratecontrol algorithm (RCA) for variable bit rate (VBR) videoapplications. The proposed RCA provides high qualitycompressed video with a low degree computational complexity.By controlling the quantization parameter (QP) on a picturebasis, it produces VBR video bit streams. The proposed RCAhas been implemented on the JM H.264/AVC video codec andth...
متن کاملAdvanced Bit Manipulation Instructions: Architecture, Implementation and Applications
Advanced bit manipulation operations are not efficiently supported by commodity wordoriented microprocessors. Programming tricks are typically devised to shorten the long sequence of instructions needed to emulate these complicated bit operations. As these bit manipulation operations are relevant to applications that are becoming increasingly important, we propose direct support for them in mic...
متن کاملFPGA Implementation of JPEG and JPEG2000-Based Dynamic Partial Reconfiguration on SOC for Remote Sensing Satellite On-Board Processing
This paper presents the design procedure and implementation results of a proposed hardware which performs different satellite Image compressions using FPGA Xilinx board. First, the method is described and then VHDL code is written and synthesized by ISE software of Xilinx Company. The results show that it is easy and useful to design, develop and implement the hardware image compressor using ne...
متن کاملPerforming Advanced Bit Manipulations Efficiently in
This paper describes a new basis for the implementation of a shifter functional unit. We present a design based on the inverse butterfly and butterfly datapath circuits that performs the standard shift and rotate operations, as well as more advanced extract, deposit and mix operations found in some processors. Additionally, it also supports important new classes of even more advanced bit manipu...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2006